import Https from '@/utils/https'

// 获取项目列表
const projectList = (params) => Https.get('/api/v1/project/list/all', params)
// 获取当前用户有权限的项目列表
const getProjectListByUserId = () => Https.get('/api/v1/management/user/project/getProjectList?pageNum=1&pageSize=10000')
// 退出登录
const logout = (params) => Https.post('/api/v1/auth/logout', params)
// 获取用户信息
const getUserInfo = (params) => Https.get('/api/v1/management/user/project/getCurrentUserInfo', params)
// 获取许可证信息
const getCert = () => Https.get('/api/v1/certificate/getCert', null, { needCode: true })
// 获取用户菜单权限
const getMenus = (params) => Https.get('/api/v1/certificate/getMenus', params)

export {
  projectList,
  logout,
  getUserInfo,
  getCert,
  getMenus,
  getProjectListByUserId,
}
